<template>
  <div>
    <div class="comment">
      <ul class="comment-list">
        <li class="item" v-for="(item,index) of list" :key="index">
          <div class="ask">
            <div class="about">
              <span class="user">{{ item.userName | changeStr(0)}}</span>
              <div class="other">
                打分
                <div class="star">
                  <van-rate
                    v-model="item.scroe"
                    color="#F2962C"
                    void-icon="star-o"
                    void-color="#F2962C"
                    size="10"
                    readonly
                  />
                </div>
                <span class="date">{{item.askDate}}</span>
              </div>
            </div>
            <div class="content">
              {{item.askContent}}
            </div>
          </div>
          <div class="reply" v-if="item.replyName">
            <div class="line"></div>
            <div class="about">
              <span class="iconfont">&#xe648;<i class="site">{{item.replyName}}</i></span>
              <div class="other">
                <span class="date">{{item.replyDate}}</span>
              </div>
            </div>
            <div class="content">
              {{item.replyContent}}
            </div>
          </div>
        </li>
      </ul>
      <p class="more">查看更多</p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BaseInfo',
  props: {
    list: Array
  },
  data () {
    return {
      
    }
  },
  mounted () {
    
  },
  methods: {
    
  },
}
</script>

<style lang="less" scoped>
  @import '~styles/varibles.less';
  .comment {
    padding: 0 @pagePadding;
    &-list {
      .item {
        padding: 0 8px;
        margin-bottom: 10px;
        background-color:#F0F0F0;
        color: #000;
        &:nth-last-child(1) {
          margin-bottom: 0;
        }
        .about {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding: 10px 0;
          .user {
            font-size: 14px;
          }
          .site {
            margin-left: 10px;
            font-size: 12px;
            color: #127AED;
          }
        }
        .other {
          display: flex;
          align-items: center;
          .star {
            margin-left: 5px;
            margin-right: 10px;
          }
          .date {
            color:#8D8D8D;
          }
        }
        .line {
          height: 2px;
          background-color: #fff;
        }
        .content {
          padding: 8px 0;
        }
        .reply {
          .about {
            padding-bottom: 0;
          }
        }
      }
    }
    .more {
      padding-top: 6px;
      padding-bottom: 20px;
      text-align: center;
      font-size: 12px;
      color:#8D8D8D;
    }
  }
</style>
